<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <table id="table1" border="1" cellspacing="0" cellpadding="0">
        <thead>
            <tr>
                <th rowspan="3">序号</th>
                <th rowspan="3">工号</th>
                <th rowspan="3">规格型号</th>
                <th rowspan="3">产线</th>
                <th rowspan="3">项目名称</th>
                <th rowspan="3">物料情况</th>

                <th colspan="3">绕线</th>
            </tr>
            <tr>
                <th colspan="2">铜线</th>
                <th colspan="1">饶绝</th>
            </tr>
            <tr>
                <th>屏蔽线</th>
                <th>电磁线</th>
                <th>绕线绝缘</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td rowspan="3">1</td>
                <td rowspan="3">2025020079</td>
                <td rowspan="3">ODEFGSFS-56465</td>
                <td rowspan="3">特高压</td>
                <td rowspan="3">宁夏穗750ss</td>
                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
            </tr>
            <tr>
                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
            </tr>
            <tr>

                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
                <td>正常</td>
            </tr>
        </tbody>
    </table>

    <button id="btn" onclick="btn_export()">导出</button>
</body>
<script src="js/vue.js"></script>
<script src="js/xlsx.full.min.js"></script>
<script src="js/export.js"></script>
<script>
    // 将一个sheet转成最终的excel文件的blob对象，然后利用URL.createObjectURL下载

    function btn_export() {
        var table1 = document.querySelector("#table1");
        var sheet = XLSX.utils.table_to_sheet(table1);//将一个table对象转换成一个sheet对象
        openDownloadDialog(sheet2blob(sheet), '下载.xlsx');
    }
</script>

</html>